<?php
include "funciones.php";
$errorEditar = $_COOKIE['errorEditar'];
setcookie("errorEditar",0);
$errorBorrar = $_COOKIE['errorBorrar'];
setcookie("errorBorrar",0);
$okBorrar = $_COOKIE['okBorrar'];
setcookie("okBorrar",0);
$okEditar = $_COOKIE['okEditar'];
setcookie("okEditar",0);
if (sesion()) {
?>
<html>
    <head>
        <link rel="stylesheet" href="estilos/noticias.css">
        <script type="text/javascript" src="javascript/noticias.js">
           
        </script>
        <title>
            BUSCAR NOTICIA
        </title>
    </head>
    <body>
        <?php
            pintar_menu("buscar_noticia");
        ?>
        <div class="titulo">
                BUSCAR NOTICIA
        </div>
        
        <article>
            <form method="post" action="mostrarNoticias.php">
            <?php
                    include "menuBuscar.php";
                    echo "<div class=\"noticia\">";
                    include "listadoNoticias.php";
             
                    if ($_COOKIE['okBorrar'] == 1) {
                        echo "<table width=\"100%\">";
                        echo "<tr><td>";
                        echo "<div class=\"ok\" style=\"display:block;\">La noticia se borr&oacute satisfactoriamente</div>";
                        echo "</td></tr>";
                        echo "</table>";
                    }
            ?>
                </div>
            </form>
        </article>
        
    </body>
</html>
<?php
} else {
    header("Location: index.php");
}
?>